﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UniversaleMain.Master" AutoEventWireup="true" CodeBehind="ProfileMaintenance.aspx.cs" Inherits="FYPDemo.ProfileMaintenance" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1 class="h1_title">Profile Maintenance</h1>
    <table>
        <tr>
            <td>
                <asp:Label ID="lblImage" runat="server" Text="Display Picture"></asp:Label>
            </td>
            <td>
                <asp:Image ID="DisplayPicture" runat="server" Height="250px" Width="205px" />
                <br />
                <asp:FileUpload ID="FileUpload1" runat="server" />
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <asp:Button ID="btnUpload" runat="server" Text="Upload" 
                    onclick="btnUpload_Click" />
            </td>
        </tr>
        <tr style="visibility:<%=Convert.ToInt32(this.Session["Role"])==3?"visible":"hidden"%>">
            <td>
                <asp:Label ID="Label1" runat="server" Text="Vendor Code"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtVendorCode" runat="server" MaxLength="4"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ForeColor="Red" 
                ErrorMessage="Vendor must not be empty" ControlToValidate="txtVendorCode" 
                    ValidationGroup="changeGroup" Enabled="false" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ErrorMessage="Vendor code must be 4 uppercase alphabet" ValidationExpression="(^[A-Z][A-Z][A-Z][A-Z])"
                     ValidationGroup="changeGroup" ControlToValidate="txtVendorCode" ForeColor="Red" 
                    Display="Dynamic"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblEmail" runat="server" Text="Email"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ForeColor="Red" 
                ErrorMessage="Email must not be empty" ControlToValidate="txtEmail" 
                    ValidationGroup="changeGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblPhone" runat="server" Text="Phone"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ForeColor="Red" 
                ErrorMessage="Phone number must not be empty" ControlToValidate="txtPhone" 
                    ValidationGroup="changeGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblAddress" runat="server" Text="Address"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ForeColor="Red" 
                ErrorMessage="Address must not be empty" ControlToValidate="txtAddress" 
                    ValidationGroup="changeGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblPostCode" runat="server" Text="Postcode"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtPostCode" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ForeColor="Red" 
                ErrorMessage="Postcode must not be empty" ControlToValidate="txtPostCode" 
                    ValidationGroup="changeGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblState" runat="server" Text="State"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtState" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ForeColor="Red" 
                ErrorMessage="State must not be empty" ControlToValidate="txtState" 
                    ValidationGroup="changeGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Button ID="btnChange" runat="server" Text="Change" 
                    onclick="btnChange_Click" CssClass="buttonbg" ValidationGroup="changeGroup" />
            </td>
        </tr>
    </table>
</asp:Content>
